package pojo;

import java.util.List;


/**
 * @author 江岸
 * @version V1.0
 * @ClassName: NestedInteger
 * @description: 嵌套列表
 * @date 2021/3/2310:26
 * @since V1.0
 *
This is the interface that allows for creating nested lists.
You should not implement it, or speculate about its implementation
 @return true if this NestedInteger holds a single integer, rather than a nested list.

 @return the single integer that this NestedInteger holds, if it holds a single integer
 Return null if this NestedInteger holds a nested list
 @return the nested list that this NestedInteger holds, if it holds a nested list
 Return null if this NestedInteger holds a single integer
 */


    /**
     *
     */
public interface NestedInteger {

    //@return 如果此NestedInteger持有单个整数而不是嵌套列表，则返回true。
    boolean isInteger();


    //@返回此NestedInteger持有的单个整数，如果它持有单个整数;如果此NestedInteger持有一个嵌套列表，则返回null
    Integer getInteger();


    //@返回此NestedInteger持有的嵌套列表，如果它持有一个嵌套列表;如果此NestedInteger持有单个整数，则返回null
    List<NestedInteger> getList();
}
